package cn.fay.chapter14;

public class NPerson {
	public final String first;
	public final String last;
	public final String address;
	public NPerson(String first,String last,String address) {
		this.first=first;
		this.last=last;
		this.address=address;
	}
	@Override
	public String toString() {
		return "Person: "+first+" "+last+" "+address;
	}
	
	public static class NullPerson extends NPerson implements Null{
		private NullPerson() {
			super("null", "null", "null");
		}
		@Override
		public String toString() {
			return "NullPerson";
		}
	}
	
	public static final NPerson NULL=new NullPerson();
}
